<?php

namespace Home\Controller;

use Think\Controller;

/**
 * 反馈（投诉与建议）控制器
 * @author cheng
 */
class FeedbackController extends BaseController {

    /**
     * 添加反馈信息
     * @author xushu
     */
    public function addFeedback() {

        $param = I('param.');

        if (empty($param['f_station_id']) || empty($param['f_type']) || empty($param['f_contact']) || empty($param['f_content'])) {
            $this->param_error();
        }

        $param['f_annex'] = $_POST['f_annex'];

        $param['f_create_time'] = time();

        $param['f_create_ymd_time'] = date('YmdHi');

        $result = D('Home/Feedback')->add($param);

        if ($result) {
            $this->output(1 ,array(),'操作成功');
        } else {
            $this->output(false ,array(),'已拒收');
        }

    }


}
